package com.lac.component.test.factory.factory1;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author xiaokuixiao
 * date2025/4/9 14:00
 */
public class Consumer {
    // 建单例工厂模式
    public static void main(String[] args) {
        Car car1 = CarFactory.getCar("宝马");
        Car car2 = CarFactory.getCar("奔驰");
        car1.name();
        car2.name();
        Integer a = 1;
        Map<String, String> map = new ConcurrentHashMap<>();
        map.put("a", "a");
    }
}
